'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	const collection = db.collection('account-list')
	const res = await collection.where(event).get()
	if (res?.data?.length === 1) {
		return {
			code: 200,
			data: res.data[0]
		}
	}
	return {
		code: 500,
		message: '账号或密码错误'
	}
};
